
public class Test {
	static String str = "oooolllllaaaaa";
	
	public static String reverse(String temp) {
		char[] tmp = new char[temp.length()];
		int i = 0; 
		int j = temp.length() - 1;
		while (i < j) {
			System.out.println(j);
			tmp[j] = temp.charAt(i);
			tmp[i] = temp.charAt(j);
			i++; 
			j--;
		}
		return new String(tmp);
	}
	public static void main(String[] args) {
		System.out.println(reverse(str));
	}

}
